From: Sebastian Keller Date: Thu, 29 Apr 2021 14:07:21 +0000 (+0200) Subject: workspaceThumbnail: Only create thumbnails once X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~31 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=0e917c3dbf81eecd3d21f9225652eb1ff13e585a;p=gnome-shell.git workspaceThumbnail: Only create thumbnails once `ThumbnailsBox` listens for the `showing` signal from the `Overview` to create its thumbnails and destroys them on the `hide` signal. Since the `showing` signal can be emitted multiple times when switching between the shown and hidden state without ever fully completing the transition, this will cause `_createThumbnails` to be called multiple times, each time adding another set of workspaces. Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3819 Part-of: --- diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js index 6c5a2bee4..3a7d916ca 100644 --- a/js/ui/workspaceThumbnail.js +++ b/js/ui/workspaceThumbnail.js @@ -993,6 +993,9 @@ var ThumbnailsBox = GObject.registerClass({ } _createThumbnails() { + if (this._thumbnails.length > 0) + return; + let workspaceManager = global.workspace_manager; this._nWorkspacesNotifyId =